function animate(element,tag){
				if(element.timerid){
					clearInterval(element.timerid);
					element.timerid=null;
				}
				
				
				element.timerid=setInterval(function(){
					step=100;
					var current=element.offsetLeft;
					if(current>tag){
						step=-Math.abs(step);
						
					}
					console.log(step);
					if(Math.abs(current-tag)<Math.abs(step)){
						element.style.left=tag+'px'
						clearInterval(element.timerid);
						return;
					}
					current=current+step;
					element.style.left=current+'px';
					
				},30)
			}